﻿namespace = exp_thousand

#SIC Expedition of The Thousand
exp_thousand.2 = { 
	type = country_event
	placement = ROOT

	title = exp_thousand.2.t
	desc = exp_thousand.2.d
	flavor = exp_thousand.2.f

	event_image = {
		video = "gfx/event_pictures/europenorthamerica_before_the_battle.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/europenorthamerica/before_the_battle"

	icon = "gfx/interface/icons/event_icons/event_military.dds"

	duration = 1

	immediate = {
		random_country = {
			limit = {
				has_variable = garibaldi_redshirts
			}
			save_scope_as = ita_scope
		}
		scope:ita_scope = {
			random_scope_character = {
				limit = {has_variable = thousand_commander}
				save_scope_as = exp_commander
			}		
		}
	}

	option = {
		name = exp_thousand.2.a
		default_option = yes

	    ai_chance = {
			base = 1	
		}
    }
}

#SIC Garibaldi Wins
exp_thousand.3 = { 
	type = country_event
	placement = ROOT

	title = exp_thousand.3.t
	desc = exp_thousand.3.d
	flavor = exp_thousand.3.f

	event_image = {
		video = "gfx/event_pictures/unspecific_devastation.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/europenorthamerica/before_the_battle"

	icon = "gfx/interface/icons/event_icons/event_military.dds"

	duration = 1

	immediate = {
		random_country = {
			limit = {
				has_variable = garibaldi_redshirts
			}
			save_scope_as = ita_scope
		}
		scope:ita_scope = {
			random_scope_character = {
				limit = {has_variable = thousand_commander}
				save_scope_as = exp_commander
			}		
		}
	}

	option = {
		name = exp_thousand.3.a
		default_option = yes

		scope:ita_scope = {
			trigger_event = {
				id = exp_thousand.4
				days = 30
				popup = yes
			}
		}

	    ai_chance = {
			base = 1	
		}
    }
}

#ITALIAN_MAJOR Garibaldi Wins
exp_thousand.4 = { 
	type = country_event
	placement = ROOT

	title = exp_thousand.4.t
	desc = exp_thousand.4.d
	flavor = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = {
						c:PAP ?= {
							has_state_in_state_region = STATE_UMBRIA
						}
					}
				}
				desc = exp_thousand.4.f1
			}
			triggered_desc = {
				desc = exp_thousand.4.f2
			}
		}
	}	

	event_image = {
		video = "gfx/event_pictures/unspecific_military_parade.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/unspecific/military_parade"

	icon = "gfx/interface/icons/event_icons/event_military.dds"

	duration = 1

	immediate = {
		scope:ita_scope = {
			random_scope_character = {
				limit = {has_variable = thousand_commander}
				save_scope_as = exp_commander
			}		
		}
		ruler = {
			save_scope_as = ruler_scope
		}
		c:SIC = {
			save_scope_as = sic_scope
		}
		s:STATE_UMBRIA = {
			random_scope_state = {
				save_scope_as = umbria_scope
			}
		}
		scope:exp_commander = {
			set_character_busy = no
			remove_variable = thousand_commander
		}
		remove_variable = has_thousand_commander
		remove_variable = thousand_palermo_insurrection
	}
	
	option = {
		trigger = {
			c:PAP ?= {
				has_state_in_state_region = STATE_LAZIO
				has_state_in_state_region = STATE_UMBRIA
			}
		}
		name = exp_thousand.4.a
		default_option = yes

		create_incident = {
			country = c:PAP
			value = 15
		}

		annex = c:SIC
		every_state = {
			limit = {
				NOT = {
					state_region = s:STATE_LAZIO
				}
				owner = c:PAP
			}
			set_state_owner = scope:ita_scope
		}
		s:STATE_LAZIO = {
			set_owner_of_provinces = {
				country = ROOT
				provinces = { x3040A0 }
			}
		}

		c:PAP = {
			change_relations = {
				country = ROOT
				value = -50
			}	
		}
    	hidden_effect = {
			create_truce = {
				country = c:PAP
				months = 60
			}
		}

		set_variable = umbria_marche_invasion

	    ai_chance = {
			base = 95	
		}
    }
	option = {
		trigger = {
			c:PAP ?= {
				has_state_in_state_region = STATE_LAZIO
				has_state_in_state_region = STATE_UMBRIA
			}
		}
		name = exp_thousand.4.b

		annex = c:SIC

	    ai_chance = {
			base = 5	
		}
    }
	option = {
		trigger = {
			NOT = {
				c:PAP ?= {
					has_state_in_state_region = STATE_UMBRIA
				}
			}
		}
		name = exp_thousand.4.c

		random_state = {
			limit = {
				state_region = s:STATE_CAMPANIA
				owner = c:PAP
			}
			set_state_owner = scope:ita_scope
		}
		annex = c:SIC

	    ai_chance = {
			base = 1	
		}
    }
}

#SIC Garibaldi Lose
exp_thousand.5 = { 
	type = country_event
	placement = ROOT

	title = exp_thousand.5.t
	desc = exp_thousand.5.d
	flavor = exp_thousand.5.f

	event_image = {
		video = "gfx/event_pictures/unspecific_military_parade.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/unspecific/military_parade"

	icon = "gfx/interface/icons/event_icons/event_military.dds"

	duration = 1

	immediate = {
		random_country = {
			limit = {
				has_variable = garibaldi_redshirts
			}
			save_scope_as = ita_scope
		}
		scope:ita_scope = {
			random_scope_character = {
				limit = {has_variable = thousand_commander}
				save_scope_as = exp_commander
			}		
		}
		c:PAP = {
			save_scope_as = pap_scope
		}
	}

	option = {
		name = exp_thousand.5.a
		default_option = yes

		scope:ita_scope = {
			trigger_event = {
				id = exp_thousand.6
				days = 30
				popup = yes
			}
		}

	    ai_chance = {
			base = 1	
		}
    }
}

#ITALIAN_MAJOR Garibaldi Lose
exp_thousand.6 = { 
	type = country_event
	placement = ROOT

	title = exp_thousand.6.t
	desc = exp_thousand.6.d
	flavor = exp_thousand.6.f

	event_image = {
		video = "gfx/event_pictures/europenorthamerica_before_the_battle.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/europenorthamerica/before_the_battle"

	icon = "gfx/interface/icons/event_icons/event_military.dds"

	duration = 1

	immediate = {
		scope:ita_scope = {
			random_scope_character = {
				limit = {has_variable = thousand_commander}
				save_scope_as = exp_commander
			}		
		}
		c:SIC = {
			save_scope_as = sic_scope
		}
		remove_variable = garibaldi_redshirts
		scope:exp_commander = {
			set_character_busy = no
			remove_variable = thousand_commander
		}
		remove_variable = has_thousand_commander
		remove_variable = thousand_palermo_insurrection
	}

	option = {
		name = exp_thousand.6.a
		default_option = yes

		create_incident = {
			country = c:SIC
			value = 15
		}

	    ai_chance = {
			base = 1	
		}
    }
}

exp_thousand.7 = { 
	type = country_event
	placement = ROOT

	title = exp_thousand.7.t
	desc = exp_thousand.7.d
	flavor = exp_thousand.7.f

	event_image = {
		video = "gfx/event_pictures/unspecific_ruler_speaking_to_people.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/unspecific/leader_speaking_to_a_group_of_people"

	icon = "gfx/interface/icons/event_icons/event_portrait.dds"

	duration = 3

	trigger = {
		NOT = {
			OR = {
				AND = {
					exists = c:SIC	
					this = c:SIC
				}
				AND = {
					exists = c:PAP	
					this = c:PAP
				}
			}
			exists = c:SCL
			exists = c:ITA
			has_global_variable = exp_thousand_happened 
		}
		exists = c:SIC
		owns_entire_state_region = STATE_PIEDMONT
		owns_entire_state_region = STATE_LOMBARDY
		owns_entire_state_region = STATE_EMILIA
		owns_entire_state_region = STATE_ROMAGNA
		owns_entire_state_region = STATE_TUSCANY
		has_technology_researched = nationalism
		OR = {
			country_has_primary_culture = cu:north_italian
			country_has_primary_culture = cu:south_italian
		}
		country_rank >= rank_value:major_power
		c:SIC = {
			OR = {
				any_civil_war = {
					is_civil_war_type = revolution
					civil_war_progress >= 1
				}
				any_scope_state = {
					turmoil >= 0.15
				}
				radical_fraction = {
					value >= 0.2
				}
				any_interest_group = {
					is_marginal = no
					is_insurrectionary = yes
				}
				has_journal_entry = je_springtime_of_the_peoples	
			}
		}
	}

	immediate = {
		set_global_variable = exp_thousand_happened
		c:SIC = {
			save_scope_as = sic_scope
		}
	}

	option = {
		name = exp_thousand.7.a
		default_option = yes

		add_journal_entry = {
			type = je_exp_thousand
		}

	    ai_chance = {
			base = 99	
		}
    }
	option = {
		name = exp_thousand.7.b

	    ai_chance = {
			base = 1		
		}
    }
}

exp_thousand.8 = { 
	type = country_event
	placement = ROOT

	title = exp_thousand.8.t
	desc = exp_thousand.8.d
	flavor = exp_thousand.8.f

	event_image = {
		video = "gfx/event_pictures/europenorthamerica_before_the_battle.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/europenorthamerica/before_the_battle"

	icon = "gfx/interface/icons/event_icons/event_portrait.dds"

	duration = 1

	trigger = {
		has_variable = choose_commander
	}

	immediate = {
		remove_variable = choose_commander
		c:SIC = {
			save_scope_as = sic_scope
		}

		if = {
			limit = {
				any_scope_character = {
					has_variable = giuseppe_garibaldi
				}
			}
			random_scope_character = {
				limit = {has_variable = giuseppe_garibaldi}
				save_scope_as = garibaldi
			}
		}
		random_scope_character = {
			limit = {
				has_role = general
				is_ruler = no
				NOT = {
					has_variable = giuseppe_garibaldi
				}
			}
			save_scope_as = exp_random_general
		}
	}

	option = {
		name = exp_thousand.8.a
		default_option = yes
		custom_tooltip = expedition_costs_tt
		
		trigger = {
			any_scope_character = {
				has_variable = giuseppe_garibaldi
			}
		}

		add_modifier = {
			name = modifier_large_expedition_cost
			multiplier = money_amount_multiplier_medium
		}
		if = {
			limit = {
				any_scope_character = {
					has_variable = giuseppe_garibaldi
				}
			}
			random_scope_character = {
				limit = {has_variable = giuseppe_garibaldi}
				set_character_busy = yes
				set_variable = thousand_commander
			}
		}
		ig:ig_intelligentsia = {
			add_modifier = {
				name = expedition_commander
				months = long_modifier_time
			}
		}
		set_variable = has_thousand_commander

	    ai_chance = {
			base = 90	
		}
    }

	option = {
		name = exp_thousand.8.b
		custom_tooltip = expedition_costs_tt

		add_modifier = {
			name = modifier_large_expedition_cost
			multiplier = money_amount_multiplier_medium
		}
		scope:exp_random_general = {
			set_character_busy = yes
			set_variable = thousand_commander
		}
		ig:ig_armed_forces = {
			add_modifier = {
				name = expedition_commander
				months = long_modifier_time
			}
		}
		set_variable = has_thousand_commander

	    ai_chance = {
			base = 10		
		}
    }
}



################################## EXPEDITION EVENTS ##################################


# The Landing
exp_thousand.101 = { 
	type = country_event
	placement = ROOT

	title = exp_thousand.101.t
	desc = {
		first_valid = {
			triggered_desc = {
				desc = exp_thousand.101.d.1
				trigger = {
					NOT = {
						has_global_variable = exp_thousand_limited
					}
				}
			}
			triggered_desc = {
				desc = exp_thousand.101.d.2
				trigger = {
					has_global_variable = exp_thousand_limited
				}
			}
		}
	}
	flavor = exp_thousand.101.f

	event_image = {
		video = "gfx/event_pictures/europenorthamerica_before_the_battle.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/europenorthamerica/before_the_battle"

	icon = "gfx/interface/icons/event_icons/event_military.dds"

	duration = 1

	immediate = {
		c:SIC = {
			save_scope_as = sic_scope
		}
		s:STATE_SICILY = {
			random_scope_state = {
				save_scope_as = sicily_scope
			}
		}
		random_scope_character = {
			limit = {has_variable = thousand_commander}
			save_scope_as = exp_commander
		}	
	}

	option = {
		name = exp_thousand.101.a
		default_option = yes

		expedition_minor_progress_effect = yes
		hidden_effect = {
			trigger_event = { id = exp_thousand.102 days = 3 }
		}

	    ai_chance = {
			base = 1	
		}
    }
}

# Battle of Calatafimi
exp_thousand.102 = { 
	type = country_event
	placement = ROOT

	title = exp_thousand.102.t
	desc = exp_thousand.102.d
	flavor = exp_thousand.102.f

	event_image = {
		video = "gfx/event_pictures/europenorthamerica_before_the_battle.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/europenorthamerica/before_the_battle"

	icon = "gfx/interface/icons/event_icons/event_military.dds"

	duration = 1

	trigger = {
		has_journal_entry = je_exp_thousand_ongoing
	}

	immediate = {
		c:SIC = {
			save_scope_as = sic_scope
		}
		random_scope_character = {
			limit = {has_variable = thousand_commander}
			save_scope_as = exp_commander
		}	
	}

	option = {
		name = exp_thousand.102.a
		default_option = yes

		if = {
			limit = {
				has_global_variable = exp_thousand_limited
			}		
			random_list = {
				6 = {
					expedition_minor_progress_effect = yes
					set_variable = thousand_calatafimi_win
				}
				4 = {
					expedition_lose_progress_effect = yes
				}
			}
		}
		else = {
			random_list = {
				8 = {
					expedition_minor_progress_effect = yes
					set_variable = thousand_calatafimi_win
				}
				2 = {
					expedition_lose_progress_effect = yes
				}
			}
		}

		hidden_effect = {
			trigger_event = { id = exp_thousand.104 days = 30 }
		}

	    ai_chance = {
			base = 85	
		}
    }
	option = {
		name = exp_thousand.102.b

		add_small_peril_effect = yes

		if = {
			limit = {
				has_global_variable = exp_thousand_limited
			}		
			random_list = {
				7 = {
					expedition_minor_progress_effect = yes
					set_variable = thousand_calatafimi_win
				}
				3 = {
					expedition_lose_progress_effect = yes
				}
			}
		}
		else = {
			random_list = {
				9 = {
					expedition_minor_progress_effect = yes
					set_variable = thousand_calatafimi_win
				}
				1 = {
					expedition_lose_progress_effect = yes
				}
			}
		}

		hidden_effect = {
			trigger_event = { id = exp_thousand.104 days = 30 }
		}

	    ai_chance = {
			base = 15
		}
    }
}

# Palermo insurrection
exp_thousand.103 = { 
	type = country_event
	placement = ROOT

	title = exp_thousand.103.t
	desc = exp_thousand.103.d
	flavor = exp_thousand.103.f

	event_image = {
		video = "gfx/event_pictures/unspecific_military_parade.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/unspecific/military_parade"

	icon = "gfx/interface/icons/event_icons/event_military.dds"

	duration = 1

	trigger = {
		NOT = { has_variable = thousand_palermo_insurrection }
		NOT = { has_global_variable = exp_thousand_limited }
		has_variable = thousand_calatafimi_win
		has_journal_entry = je_exp_thousand_ongoing
	}

	immediate = {
		c:SIC = {
			save_scope_as = sic_scope
		}
		random_scope_character = {
			limit = {has_variable = thousand_commander}
			save_scope_as = exp_commander
		}	
		set_variable = thousand_palermo_insurrection	
		remove_variable = thousand_calatafimi_win
	}

	option = {
		name = exp_thousand.103.a
		default_option = yes

		expedition_minor_progress_effect = yes

	    ai_chance = {
			base = 1	
		}
    }
}

# Southern Army
exp_thousand.104 = { 
	type = country_event
	placement = ROOT

	title = exp_thousand.104.t
	desc = exp_thousand.104.d
	flavor = exp_thousand.104.f

	event_image = {
		video = "gfx/event_pictures/unspecific_military_parade.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/unspecific/military_parade"

	icon = "gfx/interface/icons/event_icons/event_military.dds"

	duration = 1

	trigger = {
		has_journal_entry = je_exp_thousand_ongoing
	}

	immediate = {
		c:SIC = {
			save_scope_as = sic_scope
		}
		random_scope_character = {
			limit = {has_variable = thousand_commander}
			save_scope_as = exp_commander
		}	
	}

	option = {
		name = exp_thousand.104.a
		default_option = yes

		expedition_minor_progress_effect = yes
		hidden_effect = {
			trigger_event = { id = exp_thousand.105 days = 50 }
		}

	    ai_chance = {
			base = 1	
		}
    }
}

# Battle of Milazzo
exp_thousand.105 = { 
	type = country_event
	placement = ROOT

	title = exp_thousand.105.t
	desc = exp_thousand.105.d
	flavor = exp_thousand.105.f

	event_image = {
		video = "gfx/event_pictures/europenorthamerica_before_the_battle.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/europenorthamerica/before_the_battle"

	icon = "gfx/interface/icons/event_icons/event_military.dds"

	duration = 1

	trigger = {
		has_journal_entry = je_exp_thousand_ongoing
	}

	immediate = {
		c:SIC = {
			save_scope_as = sic_scope
		}
		random_scope_character = {
			limit = {has_variable = thousand_commander}
			save_scope_as = exp_commander
		}	
	}

	option = {
		name = exp_thousand.105.a
		default_option = yes

		if = {
			limit = {
				has_global_variable = exp_thousand_limited
			}		
			random_list = {
				6 = {
					expedition_minor_progress_effect = yes
				}
				4 = {
					expedition_lose_progress_effect = yes
				}
			}
		}
		else = {
			random_list = {
				75 = {
					expedition_moderate_progress_effect = yes
				}
				25 = {
					expedition_lose_progress_effect = yes
				}
			}
		}

		hidden_effect = {
			trigger_event = { id = exp_thousand.106 days = 30 }
		}

	    ai_chance = {
			base = 5
		}
    }
	option = {
		name = exp_thousand.105.b

		add_small_peril_effect = yes


		if = {
			limit = {
				has_global_variable = exp_thousand_limited
			}		
			random_list = {
				7 = {
					expedition_minor_progress_effect = yes
				}
				3 = {
					expedition_lose_progress_effect = yes
				}
			}
		}
		else = {
			random_list = {
				9 = {
					expedition_moderate_progress_effect = yes
				}
				1 = {
					expedition_lose_progress_effect = yes
				}
			}	
		}

		hidden_effect = {
			trigger_event = { id = exp_thousand.106 days = 30 }
		}

	    ai_chance = {
			base = 5
		}
    }
}

# Battle of Reggio
exp_thousand.106 = { 
	type = country_event
	placement = ROOT

	title = exp_thousand.106.t
	desc = exp_thousand.106.d
	flavor = exp_thousand.106.f

	event_image = {
		video = "gfx/event_pictures/europenorthamerica_before_the_battle.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/europenorthamerica/before_the_battle"

	icon = "gfx/interface/icons/event_icons/event_military.dds"

	duration = 1

	trigger = {
		has_journal_entry = je_exp_thousand_ongoing
	}

	immediate = {
		c:SIC = {
			save_scope_as = sic_scope
		}
		random_scope_character = {
			limit = {has_variable = thousand_commander}
			save_scope_as = exp_commander
		}	
	}

	option = {
		name = exp_thousand.106.a
		default_option = yes

		add_small_peril_effect = yes

		if = {
			limit = {
				has_global_variable = exp_thousand_limited
			}		
			random_list = {
				7 = {
					expedition_minor_progress_effect = yes
				}
				3 = {
					expedition_lose_progress_effect = yes
				}
			}
		}
		else = {
			random_list = {
				9 = {
					expedition_minor_progress_effect = yes
				}
				1 = {
					expedition_lose_progress_effect = yes
				}
			}
		}

		set_variable = thousand_naples

	    ai_chance = {
			base = 75
		}
    }
	option = {
		name = exp_thousand.106.b

		if = {
			limit = {
				has_global_variable = exp_thousand_limited
			}		
			random_list = {
				6 = {
					expedition_minor_progress_effect = yes
				}
				4 = {
					expedition_lose_progress_effect = yes
				}
			}
		}
		else = {
			random_list = {
				8 = {
					expedition_minor_progress_effect = yes
				}
				2 = {
					expedition_lose_progress_effect = yes
				}
			}
		}

		set_variable = thousand_naples

	    ai_chance = {
			base = 25
		}
    }
}

# Garibaldi's entry into Naples
exp_thousand.107 = { 
	type = country_event
	placement = ROOT

	title = exp_thousand.107.t
	desc = exp_thousand.107.d
	flavor = exp_thousand.107.f

	event_image = {
		video = "gfx/event_pictures/unspecific_military_parade.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/unspecific/military_parade"

	icon = "gfx/interface/icons/event_icons/event_military.dds"

	duration = 1

	trigger = {
		has_variable = thousand_naples
		var:expedition_progress < 8 
		var:expedition_peril < 5
	}

	immediate = {
		c:SIC = {
			save_scope_as = sic_scope
			ruler = {
				save_scope_as = ruler_scope
			}
		}
		random_scope_character = {
			limit = {has_variable = thousand_commander}
			save_scope_as = exp_commander
		}	
		remove_variable = thousand_naples
	}

	option = {
		name = exp_thousand.107.a
		default_option = yes

		expedition_minor_progress_effect = yes

		set_variable = thousand_volturno

	    ai_chance = {
			base = 1	
		}
	}
}

# Battle of Volturno
exp_thousand.108 = { 
	type = country_event
	placement = ROOT

	title = exp_thousand.108.t
	desc = exp_thousand.108.d
	flavor = exp_thousand.108.f

	event_image = {
		video = "gfx/event_pictures/europenorthamerica_before_the_battle.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/europenorthamerica/before_the_battle"

	icon = "gfx/interface/icons/event_icons/event_military.dds"

	duration = 1

	trigger = {
		has_variable = thousand_volturno
		var:expedition_progress < 8 
		var:expedition_peril < 5
	}

	immediate = {
		c:SIC = {
			save_scope_as = sic_scope
			ruler = {
				save_scope_as = ruler_scope
			}
		}
		random_scope_character = {
			limit = {has_variable = thousand_commander}
			save_scope_as = exp_commander
		}
		remove_variable = thousand_volturno	
	}

	option = {
		name = exp_thousand.108.a
		default_option = yes

		add_medium_peril_effect = yes

		if = {
			limit = {
				has_global_variable = exp_thousand_limited
			}		
			random_list = {
				55 = {
					expedition_minor_progress_effect = yes
				}
				45 = {
					expedition_lose_progress_effect = yes
				}
			}
		}
		else = {
			random_list = {
				75 = {
					expedition_moderate_progress_effect = yes
				}
				25 = {
					expedition_lose_progress_effect = yes
				}
			}
		}

	    ai_chance = {
			base = 80	
		}
    }
	option = {
		name = exp_thousand.108.b

		add_small_peril_effect = yes

		if = {
			limit = {
				has_global_variable = exp_thousand_limited
			}		
			random_list = {
				45 = {
					expedition_minor_progress_effect = yes
				}
				55 = {
					expedition_lose_progress_effect = yes
				}
			}
		}
		else = {
			random_list = {
				6 = {
					expedition_moderate_progress_effect = yes
				}
				4 = {
					expedition_lose_progress_effect = yes
				}
			}
		}

	    ai_chance = {
			base = 20
		}
    }
}

exp_thousand.109 = { #Random event POSITIVE
	type = country_event
    placement = scope:current_expedition_location
	
    hidden = yes

    duration = 1

	immediate = {
		post_notification = expedition_progress_average
		expedition_minor_progress_effect = yes
	}
}

exp_thousand.110 = { #Random event NEGATIVE
	type = country_event
    placement = root
	
	title = exp_thousand.110.t
	desc = exp_thousand.110.d
	flavor = exp_thousand.110.f

	event_image = {
		video = "gfx/event_pictures/europenorthamerica_before_the_battle.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/europenorthamerica/before_the_battle"

	icon = "gfx/interface/icons/event_icons/event_military.dds"

    duration = 1

    immediate = {
		c:SIC = {
			save_scope_as = sic_scope
		}
		random_scope_character = {
			limit = {has_variable = thousand_commander}
			save_scope_as = exp_commander
		}
    }

	option = {
		name = exp_thousand.110.a
		default_option = yes

 		add_small_peril_effect = yes

	    ai_chance = {
			base = 1
		}
    }
}

exp_thousand.111 = { #Random battle
	type = country_event
    placement = root
	
	title = exp_thousand.111.t
	desc = exp_thousand.111.d
	flavor = exp_thousand.111.f

	event_image = {
		video = "gfx/event_pictures/europenorthamerica_before_the_battle.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/europenorthamerica/before_the_battle"

	icon = "gfx/interface/icons/event_icons/event_military.dds"

    duration = 1

    immediate = {
		c:SIC = {
			save_scope_as = sic_scope
		}
		random_scope_character = {
			limit = {has_variable = thousand_commander}
			save_scope_as = exp_commander
		}
    }

	option = {
		name = exp_thousand.111.a
		default_option = yes

 		add_small_peril_effect = yes

		if = {
			limit = {
				has_global_variable = exp_thousand_limited
			}		
			random_list = {
				6 = {
					expedition_minor_progress_effect = yes
				}
				4 = {
					expedition_lose_progress_effect = yes
				}
			}
		}
		else = {
			random_list = {
				7 = {
					expedition_minor_progress_effect = yes
				}
				3 = {
					expedition_lose_progress_effect = yes
				}
			}
		}

	    ai_chance = {
			base = 75
		}
    }
	option = {
		name = exp_thousand.111.b

 		add_small_peril_effect = yes
 		add_small_peril_effect = yes

		if = {
			limit = {
				has_global_variable = exp_thousand_limited
			}		
			random_list = {
				75 = {
					expedition_minor_progress_effect = yes
				}
				25 = {
					expedition_lose_progress_effect = yes
				}
			}
		}
		else = {
			random_list = {
				85 = {
					expedition_minor_progress_effect = yes
				}
				15 = {
					expedition_lose_progress_effect = yes
				}
			}
		}

	    ai_chance = {
			base = 25
		}
    }
}